package org.csu.sei.entity.DTO;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.csu.sei.entity.NewsContent;

public class NewsContentDTO {
    @JsonProperty("news_id")
    private Long newsId;
    private String content;

    public NewsContentDTO(NewsContent newsContent){
        this.newsId = newsContent.getNewsId();
        this.content = newsContent.getContent();
    }

    public static NewsContentDTO returnNewsContent(NewsContent newsContent){
        return new NewsContentDTO(newsContent);
    }
}
